package com.action;

import com.entity.Cinema;
import com.entity.Hall;
import com.entity.Seats;
import com.service.CinemaService;
import com.service.HallService;
import com.service.SeatService;
import com.util.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

//座位管理
@Controller
@RequestMapping(value = "/seat", produces = "text/plain;charset=utf-8")
public class SeatAction extends BaseAction {

    @Autowired
    private SeatService seatService;
    

    // 显示全部数据
    @RequestMapping("getAllSeat.action")
    public String getAllHall(String number) {
        List<Seats> seatList = seatService.getAllSeat();
        PageHelper.getPage(seatList, "seat", null, null, 10, number, this.getRequest(), null);
        return "admin/listseat";
    }

}